package com.huiyeji.dynamic.core;

import java.util.List;

public class RegexContainer {

    private List<String> regexes;

    public RegexContainer(){}

    public RegexContainer(List<String> regexes){
        this.regexes = regexes;
    }

    public void add(String regex){
        regexes.add(regex);
    }

    public boolean isMatch(String str){
        for(String regex : regexes){
            if(str.matches(regex)){
                return true;
            }
        }
        return false;
    }
}
